﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Commons.Entity;

namespace Commons.Web
{
    /// <summary>
    /// 文件上传
    /// </summary>
    public interface IFileUpload
    {
        /// <summary>
        /// 文件上传
        /// </summary>
        /// <param name="type">文件上传业务类型</param>
        /// <returns>上传后用户可以访问到图片的URL</returns>
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, string uploadPath);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, ImageSize imageSize);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, ImageSize imageSize, string uploadPath);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, bool IsUploadImageServer);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, bool IsUploadImageServer, string uploadPath);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, ImageSize imageSize, bool IsUploadImageServer);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, ImageSize imageSize, bool IsUploadImageServer, string uploadPath);
        VMessage Image(UpLoadType type, HttpPostedFileBase hpf, bool IsScale, ImageSize imageSize, bool IsUploadImageServer, string uploadPath);
        /// <summary>
        /// 文件上传->上传到图像服务器上
        /// </summary>
        /// <param name="url">已经存在的图片URL</param>
        /// <returns>上传到服务器上后的最新URL</returns>
        VMessage ImageToServer(string url);

    }
}
